package com.csg.ses.dao.ses;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.csg.ses.entity.ses.SysEmployeeEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 雇员
 * @author wangjun
 * @date 2020/11/16
 */
@Mapper
public interface SysEmployeeDao extends BaseMapper<SysEmployeeEntity> {
    /**
     * 自定义sql分页
     * @param page
     * @param qw
     * @return
     */
    IPage<SysEmployeeEntity> retrieve(IPage<SysEmployeeEntity> page, @Param(Constants.WRAPPER) Wrapper<SysEmployeeEntity> qw);
    List<SysEmployeeEntity> getAllEmployee();
    List<SysEmployeeEntity> getById();
    Integer ifHaveUserName(SysEmployeeEntity sysEmployee);
    SysEmployeeEntity getByUserName(@Param("loginCode")String loginCode);
    Integer getNextId();
}